import request from "@/router/axios";

export const getPage = (page, params) => {
  return request({
    url: '/api/uic-system/fillteamuser/page',
    method: 'get',
    params: {
      ...page,
      ...params,
    }
  })
}

export const save = (form) => {
  return request({
    url: '/api/uic-system/fillteamuser/save',
    method: 'post',
    data: {
      ...form
    }
  })
}

export const update = (form) => {
  return request({
    url: '/api/uic-system/fillteamuser/update',
    method: 'post',
    data: {
      ...form
    }
  })
}

export const remove = (id) => {
  return request({
    url: '/api/uic-system/fillteamuser/remove',
    method: 'post',
    params: {
      ids: id
    }
  })
}

export const bindCard = (form) => {
  return request({
    url: '/api/uic-system/fillteamuser/bindCard',
    method: 'post',
    data: {
      ...form
    }
  })
}

// 绑定电子卡
export const bindCard2 = (form) => {
  return request({
    url: '/api/uic-system/fillteamcar/bindCard',
    method: 'post',
    data: {
      ...form
    }
  })
}

// 绑定司机
export const bindCar = (form) => {
  return request({
    url: '/api/uic-system/fillteamuser/bindCar',
    method: 'post',
    data: {
      ...form
    }
  })
}

// 解绑司机
export const unbindCar = (carId, userId) => {
  return request({
    url: '/api/uic-system/fillteamuser/unbindCar',
    method: 'post',
    data: {
      id: userId,
      carId,
    }
  })
}


